import re
text = """
ip route-static 10.11.230.0 255.255.255.0 10.10.253.134
!ip route-static 10.11.231.0 255.255.255.0 10.10.253.134
ip route-static 10.11.232.0 255.255.255.0 10.10.253.134
ip route-static 10.11.233.0 255.255.255.0 10.10.253.134
ip route-static 136.41.37.217 255.255.255.255 10.10.254.177
ip route-static 136.53.2.64 255.255.255.192 136.53.2.34
#
snmp-agent
snmp-agent local-engineid 800007DB03C0FFA8764F60
snmp-agent community write cipher %^%#Q$T_/AR.SXR{kDNuyx$VPD]i.1x/UOs`+YPCFrY#,>!JCh,+hU1HlZIR.Yw6BzZ#Qm*y%9k}5s3G2EH~%^%#
snmp-agent sys-info version all
snmp-agent trap enable
#
stelnet server enable
ssh user JJJ@idc
ssh user JJJ@idc authentication-type password
ssh user JJJ@idc service-type all
ssh user JJJ@idc1
ssh user JJJ@idc1 authentication-type password
ssh user JJJ@idc1 service-type all
ssh user test
ssh user test authentication-type password
ssh user test service-type stelnet
ssh client first-time enable
ssh client 10.10.254.2 assign ecc-key 10.10.254.2
ssh client 10.10.254.27 assign ecc-key 10.10.254.27
ssh client 10.10.254.28 assign ecc-key 10.10.254.28
ssh client 10.10.254.45 assign ecc-key 10.10.254.45
ssh server acl 2999
ssh server cipher aes256_ctr aes128_ctr
ssh server hmac sha2_256
ssh server key-exchange dh_group16_sha512 dh_group15_sha512 dh_group14_sha256 dh_group_exchange_sha256
ssh client cipher aes256_ctr aes128_ctr
ssh client hmac sha2_256
ssh server dh-exchange min-len 2048
#
cpu-defend-policy test global
cpu-defend-policy test
#
user-interface maximum-vty 15
user-interface con 0
 authentication-mode password
 set authentication password cipher $1c$dMh+==NY;Q$@%_vH#")CM>Ndf9{,~<!h/D"%AxASNWBZ3IgchV0$
user-interface vty 0 4
 acl 2999 inbound
 authentication-mode aaa
 user privilege level 15
 screen-length 20
user-interface vty 5 14
 authentication-mode aaa
 user privilege level 3
 idle-timeout 0 0
 screen-length 0
 protocol inbound all
user-interface vty 16 20
#
dot1x-access-profile name dot1x_access_profile
#
mac-access-profile name mac_access_profile
#
ops
#
return
<JJJ-A1-1F-YW-2-S9303> dis vrr
<JJJ-A1-1F-YW-2-S9303> dis vrrp b
"""
pattern = r"!(.*?)return"
matches = re.findall(pattern, text)
for match in matches:
    print(match)
    